<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>17JOYS管理后台 - 添加文章</title>
<link href="../Public/images/skin.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/17joys.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
table.admintable td.key{
	background-color:#F6F6F6;
	border-bottom:1px solid #E9E9E9;
	border-right:1px solid #E9E9E9;
	color:#666666;
	font-weight:bold;
	text-align:right;
	width:140px;
}
.button {
	border:1px solid #B6B3AF;
	padding:1px 4px 0;
	height:21px;
}

input, select {
	border:1px solid silver;
	font-size:13px;
}
input.inputbox{
	width:180px;
}
span.red_font {
	color:red;
}
-->
</style>
<script type="text/javascript" src="__PUBLIC__/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
function onloadfun(){
	var fck=new FCKeditor('introtext');
	fck.BasePath="__PUBLIC__/fckeditor/";
	fck.Width="700";
	fck.Height="300";
	fck.ReplaceTextarea();
}
window.onload=onloadfun;

function fnOnSubmit(form){
	var oeditor=FCKeditorAPI.GetInstance('introtext');
	oeditor.UpdateLinkedField();
}

      	var cat = new Array;
      	cat[0]=new Array('-1','-1','选择文章类别');
      	<volist name="clist" id="category" key="k">
      	cat[{$k}]=new Array('{$category["sectionid"]}','{$category["id"]}','{$category["title"]}');
        </volist>
		function changeCatList(){
			var secobj=document.adminForm.sectionid;
			var catobj=document.adminForm.catid;
			catobj.innerHTML="";
			var sid=secobj.options[secobj.selectedIndex].value;
			var j=0;
			for(var i=0;i<cat.length;i++){				
				if(cat[i][0]==sid){
					var opt=new Option();
					opt.value=cat[i][1];
					opt.text=cat[i][2];
					catobj.options[j++]=opt;
				}
			}			
			if(catobj.options.length<1){
				var opt=new Option();
				opt.value=cat[0][1];
				opt.text=cat[0][2];
				catobj.options[0]=opt;
			}
		}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="../Public/images/mail_leftbg.gif"><img src="../Public/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="../Public/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">添加文章</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="../Public/images/mail_rightbg.gif"><img src="../Public/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="../Public/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2" valign="top">&nbsp;</td>
        <td>&nbsp;</td>
        <td valign="top">&nbsp;</td>
      </tr>
      <tr>
      <td>
      <div class="tip-msg ">
                提示: 带<span class="red_font">*</span>的项目为必填信息. 		
      </div>
      <form name="adminForm" action="__URL__/insert" method="post">
      <table class="admintable" id="admintable">
		<tr><td class="key">标题：<span class="red_font">*</span></td>
		<td><input type="text" name="title" /></td></tr>
		<tr><td class="key">别名：</td><td><input type="text" name="alias" /></td></tr>
		<tr><td class="key">是否发布：</td>
		<td>
		是<input type="radio" name="published" value="1" checked="checked" />
		否<input type="radio" name="published" value="0" />
		</td>
		</tr>
		<tr>
		<td class="key">所属单元：</td>
		<td>
		<select name="sectionid" onchange="changeCatList();">
			<option value="-1">请选择文章单元</option>
		<volist name="slist" id="section">
			<option value="{$section['id']}">{$section['title']}</option>
		</volist>
		</select>
		</td>
		</tr>
		<tr>
		<td class="key">所属分类：</td>
		<td>
		<select name="catid">
			<option value="-1">请选择文章类别</option>
		</select>
		</td>
		</tr>
		<tr>
		<td class="key">访问级别：</td>
		<td>
		<select name="access">
			<option value="0">公开</option>
			<volist name="rlist" id="role">
			<option value="{$role['id']}">{$role['name']}</option>
			</volist>
		</select>
		</td>
		</tr>
		<tr>
		<td class="key">文章简介：</td>
		<td><textarea name="title_alias" rows="5" cols="40"></textarea></td>
		</tr>
		<tr>
		<td colspan="2">
		<textarea name="introtext"></textarea>
		</td>
		</tr>
		<tr>
		<td>
		<input type="submit" value="保存" />
		<input type="submit" value="应用" />
		<input class="button" type="button" onclick="history.go(-1);" value="取消" />
		</td>
		</tr>
		</table>
      </form>
      </td>
      </tr>
    </table>
    </td>
    <td background="../Public/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="../Public/images/mail_leftbg.gif"><img src="../Public/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="../Public/images/buttom_bgs.gif"><img src="../Public/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="../Public/images/mail_rightbg.gif"><img src="../Public/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>